package com.kexio.file.dto;

/**
 * 文件上传结果
 * 
 * @author kexio
 */
public class FileUploadResult {
    
    /** 文件ID */
    private Long fileId;
    
    /** 文件存储键 */
    private String storageKey;
    
    /** 文件访问URL */
    private String accessUrl;
    
    /** 文件哈希值 */
    private String fileHash;
    
    /** 文件大小 */
    private Long fileSize;
    
    /** 上传时间戳 */
    private Long uploadTimestamp;
    
    /** 是否为秒传 */
    private Boolean instantUpload = false;
    
    /** 存储类型 */
    private String storageType;

    // ==================== 构造函数 ====================
    
    public FileUploadResult() {}

    public FileUploadResult(Long fileId, String storageKey, String accessUrl) {
        this.fileId = fileId;
        this.storageKey = storageKey;
        this.accessUrl = accessUrl;
        this.uploadTimestamp = System.currentTimeMillis();
    }

    // ==================== Getter/Setter方法 ====================
    
    public Long getFileId() { return fileId; }
    public void setFileId(Long fileId) { this.fileId = fileId; }

    public String getStorageKey() { return storageKey; }
    public void setStorageKey(String storageKey) { this.storageKey = storageKey; }

    public String getAccessUrl() { return accessUrl; }
    public void setAccessUrl(String accessUrl) { this.accessUrl = accessUrl; }

    public String getFileHash() { return fileHash; }
    public void setFileHash(String fileHash) { this.fileHash = fileHash; }

    public Long getFileSize() { return fileSize; }
    public void setFileSize(Long fileSize) { this.fileSize = fileSize; }

    public Long getUploadTimestamp() { return uploadTimestamp; }
    public void setUploadTimestamp(Long uploadTimestamp) { this.uploadTimestamp = uploadTimestamp; }

    public Boolean getInstantUpload() { return instantUpload; }
    public void setInstantUpload(Boolean instantUpload) { this.instantUpload = instantUpload; }

    public String getStorageType() { return storageType; }
    public void setStorageType(String storageType) { this.storageType = storageType; }
}
